<?php
require_once('conn.php');


function selectArt($aid)
{
  $sql = "select * from tbl_article where article_id = '$aid';";
  return exec_select($sql)[0];
}

function allBoard()
{
  $sql = 'select * from tbl_board;';
  return exec_select($sql);
}
function byIdAllBoard($bid)
{
  $sql = "select * from tbl_board where board_id = '$bid';";
  return exec_select($sql)[0];
}
function changeArt($aid, $title, $bid, $text)
{
  $sql = "update tbl_article set title='$title',content='$text',board_id='$bid',updated_time=NOW() where  article_id = '$aid';";
  return exec_update($sql);
}
?>